]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dash: Adjust CSS in RTL locales
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 18 Feb 2011 22:59:49 +0000 (23:59 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 19 Feb 2011 10:19:19 +0000 (11:19 +0100)
As the dash uses different widths and radii for left and right
borders, we need to use different CSS when it is positioned at
the right of the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=642721

data/theme/gnome-shell.css
js/ui/dash.js

index 2da9cc2f820a6587f9b4cae52f6d1875702a3d75..824bda3b726e05368b41e5791afcb399060833a1 100644 (file)
@@ -315,6 +315,12 @@ StTooltip StLabel {
     border-radius: 0px 9px 9px 0px;
 }
 
+#dash:rtl {
+    border-left: 1px;
+    border-right: 0px;
+    border-radius: 9px 0px 0px 9px;
+}
+
 #dash:empty {
     height: 100px;
     width: 60px;
index 6a39edc481e3789934681daaeb8eefa71283f531..e0a48e59e35bd21233238fb7d9dfb8a8002cb174 100644 (file)
@@ -262,6 +262,11 @@ Dash.prototype = {
                                        clip_to_allocation: true });
         this._box._delegate = this;
 
+        // This will eventually be automatic, see
+        // https://bugzilla.gnome.org/show_bug.cgi?id=584662
+        if (St.Widget.get_default_direction () == St.TextDirection.RTL)
+            this._box.add_style_pseudo_class('rtl');
+
         this.actor = new St.Bin({ y_align: St.Align.START, child: this._box });
         this.actor.connect('notify::height', Lang.bind(this,
             function() {